package com.dmall.sb.dao;

import com.dmall.sb.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from dmall_user")
    List<User> findAll();

    @Insert("insert into dmall_user(`login_name`, `password`, `real_name`, `gender`, `birth`, `desc`) values(#{loginName}, #{password}, #{realName}, #{gender}, #{birth}, #{desc})")
    int insertUser(User user);
}
